﻿/*
 * Created by SharpDevelop.
 * User: xieen
 * Date: 2013-08-19
 * Time: 14:42
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
namespace GoF23Learning._08.Decorator_Pattern.Refactor
{
	/// <summary>
	/// Description of Decorator.
	/// Stream 
	/// </summary>
	public abstract class Decorator :ITank //接口继承，契约继承
	{
		private ITank tank; //Has -A 对象组合
		
		public ITank Tank {
			get { return tank; }
			set { tank = value; }
		}		

		public Decorator(ITank tank)
		{
			this.tank = tank;
		}

		public virtual void Shot()
		{
			Console.WriteLine("Decorator Shot") ;
		}
		
		public virtual void Run()
		{
			Console.WriteLine("Decorator Run") ;
		}
	}
}
